// const userRouter = require('../router/users');
const Koa = require('koa');
const app = new Koa();
const authRouter = require('../router/auth');
const router = require('koa-router');
const bodyParser = require('koa-bodyparser');
const errHandle = require('./errHandle');
const userRouter = require('../router/index');


app.use(bodyParser());//解析post请求的body
userRouter(app);
app.on('error',errHandle);//错误处理中间件
module.exports = app;
